package com.hsl.study.config;

import dev.langchain4j.model.chat.ChatLanguageModel;
import dev.langchain4j.model.openai.OpenAiChatModel;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: hsl
 * @CreateTime: 2025-03-12  18:48
 */
@Configuration
public class ChatLanguageModelConfig {

    @Bean
    public ChatLanguageModel ChatLanguageModel() {
        return OpenAiChatModel.builder()
                .apiKey(System.getenv("LANGCHAIN_QIANQWEN"))
                .baseUrl("https://dashscope.aliyuncs.com/compatible-mode/v1")
//                .modelName("qwen-turbo-0624")
                .modelName("qwen-vl-max")
                .build();
    }
}
